home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Utilities / Appsprites / APPMAKER CODE / MODIFIED APPMAKER CODE / Globals.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-11  |  2.1 KB  |  106 lines  |  [TEXT/KAHL]

  1. /* Globals.h */
  2. /* Created 7/8/93 2:33 PM by AppMaker */
  3.  
  4. #ifndef _H_Globals
  5. #define _H_Globals
  6.  
  7. #ifndef __SPRITEWORLD__
  8. #include <SpriteWorld.h>
  9. #endif
  10.  
  11. #ifndef __SPRITELAYER__
  12. #include <SpriteLayer.h>
  13. #endif
  14.  
  15. #ifndef __SPRITE__
  16. #include <Sprite.h>
  17. #endif
  18.  
  19. #ifndef __FRAME__
  20. #include <Frame.h>
  21. #endif
  22.  
  23. #ifndef __SPRITEWORLDUTILS__
  24. #include <SpriteWorldUtils.h>
  25. #endif
  26.  
  27. #ifndef __APPLICATION__
  28. #include "Application.h"
  29. #endif
  30.  
  31. #ifndef __SIMPLE__
  32. #include "Simple.h"
  33. #endif
  34.  
  35.  
  36. enum
  37. {
  38.     kSpriteCIconResID = 128,
  39.     kNumberOfSpriteFrames = 1,
  40.     kNumberOfSprites = 6,
  41.     kSpriteMoveTime = 10,
  42.     kHorizMoveDelta = 16,
  43.     kVertMoveDelta = 16,
  44.     kPixPatResID = 128,
  45.     kMaxSpriteTime = 100
  46. };
  47.  
  48.  
  49. typedef struct {
  50.     /* Standard fields: */
  51.         TEHandle        text;
  52.         ControlHandle    vScroll;
  53.         ControlHandle    hScroll;
  54.         short            fileNum;
  55.         short            volNum;
  56.         Boolean            dirty;
  57.         StringHandle    filename;
  58.         enum {noWindow, WMainWindow}    windowKind;
  59.         Handle            witlHandle;        /* Window itemlist resource */
  60.         Handle            wictHandle;        /* Window item color table resource */
  61.  
  62.     /* Application-specific fields: */
  63.     /* for MainWindow: */
  64.         int                moveSpeedArray[kNumberOfSprites];
  65.         int                moveSpeed;
  66.         short            SetAllSpeeds;
  67.  
  68.  
  69.     /* SpriteWorld fields: */
  70.         PixPatHandle     pixPatH;
  71.         SpriteWorldPtr    spriteWorldP;
  72.         SpriteLayerPtr    spriteLayerP;
  73.         SpritePtr        simpleSpriteArray[kNumberOfSprites];
  74.         SpritePtr        simpleSpriteP;
  75.         Rect            moveBoundsRect;
  76.         short            spriteNum;
  77. } WinInfoRec, *WinInfoPtr;
  78.  
  79. typedef struct {
  80.     Boolean            hasGestalt;            /* has Gestalt manager    */
  81.     Boolean            hasWNE;                /* has WaitNextEvent    */
  82.     Boolean            hasColorQD;            /* has Color QuickDraw    */
  83.     Boolean            hasAppleEvents;        /* has Apple Events        */
  84.     Boolean            hasEditionMgr;        /* has Edition Manager    */
  85. } SysConfigRec;
  86.  
  87. /* Standard vars: */
  88. extern Boolean            quittingTime;
  89. extern EventRecord        curEvent;
  90. extern WindowPtr        curWindow;
  91. extern WinInfoPtr        cur;
  92. extern Boolean            inBackground;
  93. extern SysConfigRec        sysConfig;
  94.  
  95. /* Application-specific vars: */
  96.  
  97. /*----------*/
  98. void    InitGlobals        (void);
  99. void    SetInfo            (WindowPtr        window);
  100. void    SetNewInfo        (WindowPtr        window);
  101. void    DiscardInfo        (WindowPtr        window);
  102.  
  103. #endif    /* _H_Globals */
  104.  
  105. /* Globals */
  106.